< previous page page_242 next page >

Page 242
When you select the target format, you see a File Open dialog box asking you to select the database you want to compact. The database you select cannot be opened by any other program while it is being compacted. After you select the source database, you have to enter the name of the destination database file. If you select the same name as the source, your current data file is overwritten with the new format. If you select a new database filename, all information is copied from the source database to the target database.
warning.gif
Even though Visdata allows you to compact a database file onto itself, this practice is not recommended. If anything happens midway through the compacting process, you could lose some or all of your data. Always compact a database to a new database filename.

Before Visdata compacts your database, you will be asked if you want to encrypt the data. If you say Yes, Visdata copies all data and encrypts the file so that only those who have access to the security files can read the data. We talk more about data encryption on Day 21 ''Securing Your Database Applications."
Repair MDB . . .
If you get a "database corrupt" error when you attempt to open a Microsoft Jet database file, you may need to repair your database. Database files can become damaged due to power surges during read/write operations or due to physical device errors (damaged disk drive plates, and so on). You can repair an existing database by selecting Repair MDB . . . from the File menu. You then see a File Open dialog box that asks you for the database filename. Once you select the filename, Visdata loads and repairs the database to the best of its capabilities. Unfortunately, you may receive a message saying some of the data could not be recovered.
Tip.gif
Remember to make copies of your database on a regular basis. You should not depend on the Repair routine to recover all your data. If you experience a program crash due to corrupted data, you can always restore the file from the most recent backup.
You should also use the Windows 95 or DOS defragment utility on your hard drive after performing a Compact or Repair function to improve the overall performance of your application.

 
< previous page page_242 next page >

If you like this book, buy it!